package com.sg.controller.bff;

import com.sg.common.ro.OkrResult;
import com.sg.service.biz.bff.AchievementService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Achievement", tags = {"Achievement"})
@RestController
// @RequestMapping("/oms/achievement/")
public class AchievementController {

    @Autowired
    AchievementService achievementService;

    /**
     * B3查询成果类别列表(管理)
     * gen by moon at 4/3/2024, 2:06:47 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementCategoryList")
    @ApiOperation(value = "B3查询成果类别列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementCategoryListRespDto> queryAchievementCategoryList(@RequestBody(required = false) @Validated BffQueryAchievementCategoryListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementCategoryList(reqDTO));
    }

    /**
     * B3新增成果类型(管理)
     * gen by moon at 4/3/2024, 2:26:44 PM
     */
    @PostMapping("/oms/mgt/achievement/addAchievementType")
    @ApiOperation(value = "B3新增成果类型(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementTypeRespDto> addAchievementType(@RequestBody(required = false) @Validated BffAddAchievementTypeReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievementType(reqDTO));
    }

    /**
     * B3新增成果类别(管理)
     * gen by moon at 4/3/2024, 2:26:47 PM
     */
    @PostMapping("/oms/mgt/achievement/addAchievementCategory")
    @ApiOperation(value = "B3新增成果类别(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementCategoryRespDto> addAchievementCategory(@RequestBody(required = false) @Validated BffAddAchievementCategoryReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievementCategory(reqDTO));
    }

    /**
     * B3新增成果等级(管理)
     * gen by moon at 4/3/2024, 2:26:50 PM
     */
    @PostMapping("/oms/mgt/achievement/addAchievementGrade")
    @ApiOperation(value = "B3新增成果等级(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementGradeRespDto> addAchievementGrade(@RequestBody(required = false) @Validated BffAddAchievementGradeReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievementGrade(reqDTO));
    }

    /**
     * B3查询成果类型列表(管理)
     * gen by moon at 4/3/2024, 2:26:53 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementTypeList")
    @ApiOperation(value = "B3查询成果类型列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementTypeListRespDto> queryAchievementTypeList(@RequestBody(required = false) @Validated BffQueryAchievementTypeListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementTypeList(reqDTO));
    }

    /**
     * B3查询成果类型等级关系列表(管理)
     * gen by moon at 4/3/2024, 2:26:56 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementTypeGradeRelationshipList")
    @ApiOperation(value = "B3查询成果类型等级关系列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementTypeGradeRelationshipListRespDto> queryAchievementTypeGradeRelationshipList(@RequestBody(required = false) @Validated BffQueryAchievementTypeGradeRelationshipListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementTypeGradeRelationshipList(reqDTO));
    }

    /**
     * B3修改成果类别(管理)
     * gen by moon at 4/3/2024, 2:26:59 PM
     */
    @PostMapping("/oms/mgt/achievement/updateAchievementCategory")
    @ApiOperation(value = "B3修改成果类别(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateAchievementCategoryRespDto> updateAchievementCategory(@RequestBody(required = false) @Validated BffUpdateAchievementCategoryReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchievementCategory(reqDTO));
    }

    /**
     * B3删除成果类别(管理)
     * gen by moon at 4/3/2024, 2:27:01 PM
     */
    @PostMapping("/oms/mgt/achievement/deleteAchievementCategory")
    @ApiOperation(value = "B3删除成果类别(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementCategoryRespDto> deleteAchievementCategory(@RequestBody(required = false) @Validated BffDeleteAchievementCategoryReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementCategory(reqDTO));
    }

    /**
     * B3查询成果等级列表(管理)
     * gen by moon at 4/3/2024, 2:27:05 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementGradeList")
    @ApiOperation(value = "B3查询成果等级列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementGradeListRespDto> queryAchievementGradeList(@RequestBody(required = false) @Validated BffQueryAchievementGradeListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementGradeList(reqDTO));
    }

    /**
     * B3查询成果类型详情(管理)
     * gen by moon at 4/3/2024, 7:05:32 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementTypeDetail")
    @ApiOperation(value = "B3查询成果类型详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementTypeDetailRespDto> queryAchievementTypeDetail(@RequestBody(required = false) @Validated BffQueryAchievementTypeDetailReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementTypeDetail(reqDTO));
    }

    /**
     * B3查询成果等级详情(管理)
     * gen by moon at 4/3/2024, 7:05:39 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementGradeDetail")
    @ApiOperation(value = "B3查询成果等级详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementGradeDetailRespDto> queryAchievementGradeDetail(@RequestBody(required = false) @Validated BffQueryAchievementGradeDetailReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementGradeDetail(reqDTO));
    }

    /**
     * B3删除成果等级(管理)
     * gen by moon at 4/3/2024, 7:05:47 PM
     */
    @PostMapping("/oms/mgt/achievement/deleteAchievementGrade")
    @ApiOperation(value = "B3删除成果等级(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementGradeRespDto> deleteAchievementGrade(@RequestBody(required = false) @Validated BffDeleteAchievementGradeReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementGrade(reqDTO));
    }

    /**
     * B3删除成果类型(管理)
     * gen by moon at 4/3/2024, 7:05:54 PM
     */
    @PostMapping("/oms/mgt/achievement/deleteAchievementType")
    @ApiOperation(value = "B3删除成果类型(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementTypeRespDto> deleteAchievementType(@RequestBody(required = false) @Validated BffDeleteAchievementTypeReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementType(reqDTO));
    }

    /**
     * B3新增成果类型等级关系(管理)
     * gen by moon at 4/3/2024, 7:06:01 PM
     */
    @PostMapping("/oms/mgt/achievement/addAchievementTypeGradeRelationship")
    @ApiOperation(value = "B3新增成果类型等级关系(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementTypeGradeRelationshipRespDto> addAchievementTypeGradeRelationship(@RequestBody(required = false) @Validated BffAddAchievementTypeGradeRelationshipReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievementTypeGradeRelationship(reqDTO));
    }

    /**
     * B3发布生效成果类型等级关系(管理)
     * gen by moon at 4/3/2024, 7:06:08 PM
     */
    @PostMapping("/oms/mgt/achievement/updateAchievementTypeGradeRelationship")
    @ApiOperation(value = "B3发布生效成果类型等级关系(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateAchievementTypeGradeRelationshipRespDto> updateAchievementTypeGradeRelationship(@RequestBody(required = false) @Validated BffUpdateAchievementTypeGradeRelationshipReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchievementTypeGradeRelationship(reqDTO));
    }

    /**
     * B3修改成果类型(管理)
     * gen by moon at 4/3/2024, 7:06:16 PM
     */
    @PostMapping("/oms/mgt/achievement/updateAchievementType")
    @ApiOperation(value = "B3修改成果类型(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateAchievementTypeRespDto> updateAchievementType(@RequestBody(required = false) @Validated BffUpdateAchievementTypeReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchievementType(reqDTO));
    }

    /**
     * B3修改成果等级(管理)
     * gen by moon at 4/3/2024, 7:06:23 PM
     */
    @PostMapping("/oms/mgt/achievement/updateAchievementGrade")
    @ApiOperation(value = "B3修改成果等级(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateAchievementGradeRespDto> updateAchievementGrade(@RequestBody(required = false) @Validated BffUpdateAchievementGradeReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchievementGrade(reqDTO));
    }

    /**
     * B3调整成果类型等级关系排序(管理)
     * gen by moon at 4/3/2024, 7:06:31 PM
     */
    @PostMapping("/oms/mgt/achievement/implementAdjustAchievementTypeGradeRelationshipBusinessHandle")
    @ApiOperation(value = "B3调整成果类型等级关系排序(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAdjustAchievementTypeGradeRelationshipBusinessHandleRespDto> implementAdjustAchievementTypeGradeRelationshipBusinessHandle(@RequestBody(required = false) @Validated BffImplementAdjustAchievementTypeGradeRelationshipBusinessHandleReqDto reqDTO) {
        return OkrResult.success(achievementService.implementAdjustAchievementTypeGradeRelationshipBusinessHandle(reqDTO));
    }

    /**
     * B3新增成果(管理)
     * gen by moon at 4/3/2024, 11:26:59 PM
     */
    @PostMapping("/oms/mgt/achievement/addAchievement")
    @ApiOperation(value = "B3新增成果(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementRespDto> addAchievement(@RequestBody(required = false) @Validated BffAddAchievementReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievement(reqDTO));
    }

    /**
     * B3修改成果(管理)
     * gen by moon at 4/3/2024, 11:27:06 PM
     */
    @PostMapping("/oms/mgt/achievement/updateAchievement")
    @ApiOperation(value = "B3修改成果(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateAchievementRespDto> updateAchievement(@RequestBody(required = false) @Validated BffUpdateAchievementReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchievement(reqDTO));
    }

    /**
     * B3查询成果详情(管理)
     * gen by moon at 4/3/2024, 11:27:14 PM
     */
    @PostMapping("/oms/mgt/achievement/queryAchievementDetail")
    @ApiOperation(value = "B3查询成果详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementDetailRespDto> queryAchievementDetail(@RequestBody(required = false) @Validated BffQueryAchievementDetailReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementDetail(reqDTO));
    }

    /**
     * B3新增成果团队成员(管理)
     * gen by moon at 4/4/2024, 10:24:17 AM
     */
    @PostMapping("/oms/mgt/achievement/addAchievementTeamMember")
    @ApiOperation(value = "B3新增成果团队成员(管理)", response = OkrResult.class)
    public OkrResult<BffAddAchievementTeamMemberRespDto> addAchievementTeamMember(@RequestBody(required = false) @Validated BffAddAchievementTeamMemberReqDto reqDTO) {
        return OkrResult.success(achievementService.addAchievementTeamMember(reqDTO));
    }

    /**
     * B3执行成果发布(管理)
     * gen by moon at 4/4/2024, 10:24:25 AM
     */
    @PostMapping("/oms/mgt/achievement/implementAchievementPublish")
    @ApiOperation(value = "B3执行成果发布(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAchievementPublishRespDto> implementAchievementPublish(@RequestBody(required = false) @Validated BffImplementAchievementPublishReqDto reqDTO) {
        return OkrResult.success(achievementService.implementAchievementPublish(reqDTO));
    }

    /**
     * B3查询成果类型列表(边界)
     * gen by moon at 4/4/2024, 1:40:15 PM
     */
    @PostMapping("/oms/achievement/queryAchievementTypeListBorder")
    @ApiOperation(value = "B3查询成果类型列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementTypeListBorderRespDto> queryAchievementTypeListBorder(@RequestBody(required = false) @Validated BffQueryAchievementTypeListBorderReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementTypeListBorder(reqDTO));
    }

    /**
     * B3查询成果类别列表(边界)
     * gen by moon at 4/4/2024, 1:40:23 PM
     */
    @PostMapping("/oms/achievement/queryAchievementCategoryListBorder")
    @ApiOperation(value = "B3查询成果类别列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementCategoryListBorderRespDto> queryAchievementCategoryListBorder(@RequestBody(required = false) @Validated BffQueryAchievementCategoryListBorderReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementCategoryListBorder(reqDTO));
    }

    /**
     * B3查询成果类型等级关系列表(边界)
     * gen by moon at 4/4/2024, 1:40:30 PM
     */
    @PostMapping("/oms/achievement/queryAchievementTypeGradeRelationshipListBorder")
    @ApiOperation(value = "B3查询成果类型等级关系列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryAchievementTypeGradeRelationshipListBorderRespDto> queryAchievementTypeGradeRelationshipListBorder(@RequestBody(required = false) @Validated BffQueryAchievementTypeGradeRelationshipListBorderReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementTypeGradeRelationshipListBorder(reqDTO));
    }

    /**
     * B3批量改成果团队成员排序(管理)
     * gen by moon at 4/5/2024, 9:23:10 PM
     */
    @PostMapping("/oms/mgt/achievement/batchUpdateAchievementTeamMemberSort")
    @ApiOperation(value = "B3批量改成果团队成员排序(管理)", response = OkrResult.class)
    public OkrResult<BffBatchUpdateAchievementTeamMemberSortRespDto> batchUpdateAchievementTeamMemberSort(@RequestBody(required = false) @Validated BffBatchUpdateAchievementTeamMemberSortReqDto reqDTO) {
        return OkrResult.success(achievementService.batchUpdateAchievementTeamMemberSort(reqDTO));
    }

    /**
     * B3删除对接成果关系
     * gen by moon at 4/6/2024, 11:34:27 AM
     */
    @PostMapping("/oms/achievement/deleteAchievementDocking")
    @ApiOperation(value = "B3删除对接成果关系", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementDockingRespDto> deleteAchievementDocking(@RequestBody(required = false) @Validated BffDeleteAchievementDockingReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementDocking(reqDTO));
    }

    /**
     * B3查询可对接成果列表
     * gen by moon at 4/7/2024, 9:23:43 AM
     */
    @PostMapping("/oms/achievement/queryCanDockAchievementList")
    @ApiOperation(value = "B3查询可对接成果列表", response = OkrResult.class)
    public OkrResult<BffQueryCanDockAchievementListRespDto> queryCanDockAchievementList(@RequestBody(required = false) @Validated BffQueryCanDockAchievementListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryCanDockAchievementList(reqDTO));
    }

    /**
     * B3查询对接成果关系列表
     * gen by moon at 5/10/2024, 2:32:22 AM
     */
    @PostMapping("/oms/achievement/queryAchievementDockingList")
    @ApiOperation(value = "B3查询对接成果关系列表", response = OkrResult.class)
    public OkrResult<BffQueryAchievementDockingListRespDto> queryAchievementDockingList(@RequestBody(required = false) @Validated BffQueryAchievementDockingListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementDockingList(reqDTO));
    }

    /**
     * B3查询个人标志性成果列表
     * gen by moon at 5/13/2024, 2:56:02 AM
     */
    @PostMapping("/oms/achievement/queryPersonalSymbolicAchievementsList")
    @ApiOperation(value = "B3查询个人标志性成果列表", response = OkrResult.class)
    public OkrResult<BffQueryPersonalSymbolicAchievementsListRespDto> queryPersonalSymbolicAchievementsList(@RequestBody(required = false) @Validated BffQueryPersonalSymbolicAchievementsListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryPersonalSymbolicAchievementsList(reqDTO));
    }

    /**
     * B3删除成果类型等级关系(管理)
     * gen by moon at 6/15/2024, 5:20:01 PM
     */
    @PostMapping("/oms/mgt/achievement/deleteAchievementTypeGradeRelationship")
    @ApiOperation(value = "B3删除成果类型等级关系(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementTypeGradeRelationshipRespDto> deleteAchievementTypeGradeRelationship(@RequestBody(required = false) @Validated BffDeleteAchievementTypeGradeRelationshipReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementTypeGradeRelationship(reqDTO));
    }

    /**
     * B3修改成果冗余状态
     * gen by moon at 7/18/2024, 9:14:42 PM
     */
    @PostMapping("/oms/achievement/updateAchiveStateCode")
    @ApiOperation(value = "B3修改成果冗余状态", response = OkrResult.class)
    public OkrResult<BffUpdateAchiveStateCodeRespDto> updateAchiveStateCode(@RequestBody(required = false) @Validated BffUpdateAchiveStateCodeReqDto reqDTO) {
        return OkrResult.success(achievementService.updateAchiveStateCode(reqDTO));
    }

    /**
     * B3查询成果列表
     * gen by moon at 7/19/2024, 12:16:00 AM
     */
    @PostMapping("/oms/achievement/queryAchievementList")
    @ApiOperation(value = "B3查询成果列表", response = OkrResult.class)
    public OkrResult<BffQueryAchievementListRespDto> queryAchievementList(@RequestBody(required = false) @Validated BffQueryAchievementListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryAchievementList(reqDTO));
    }

    /**
     * B3查询个人成果库列表
     * gen by moon at 7/19/2024, 12:16:09 AM
     */
    @PostMapping("/oms/achievement/queryPersonalAchievementsList")
    @ApiOperation(value = "B3查询个人成果库列表", response = OkrResult.class)
    public OkrResult<BffQueryPersonalAchievementsListRespDto> queryPersonalAchievementsList(@RequestBody(required = false) @Validated BffQueryPersonalAchievementsListReqDto reqDTO) {
        return OkrResult.success(achievementService.queryPersonalAchievementsList(reqDTO));
    }

    /**
     * B3删除成果业务处理
     * gen by moon at 7/19/2024, 5:45:58 PM
     */
    @PostMapping("/oms/achievement/deleteAchievementBusinessHandle")
    @ApiOperation(value = "B3删除成果业务处理", response = OkrResult.class)
    public OkrResult<BffDeleteAchievementBusinessHandleRespDto> deleteAchievementBusinessHandle(@RequestBody(required = false) @Validated BffDeleteAchievementBusinessHandleReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteAchievementBusinessHandle(reqDTO));
    }

    /**
     * B3删除目标下成果
     * gen by moon at 7/19/2024, 5:46:06 PM
     */
    @PostMapping("/oms/achievement/deleteResultsUnderTarget")
    @ApiOperation(value = "B3删除目标下成果", response = OkrResult.class)
    public OkrResult<BffDeleteResultsUnderTargetRespDto> deleteResultsUnderTarget(@RequestBody(required = false) @Validated BffDeleteResultsUnderTargetReqDto reqDTO) {
        return OkrResult.success(achievementService.deleteResultsUnderTarget(reqDTO));
    }

    /**
     * B3新增目标下汇报成果
     * gen by moon at 7/20/2024, 8:50:57 PM
     */
    @PostMapping("/oms/achievement/addResultsUnderTarget")
    @ApiOperation(value = "B3新增目标下汇报成果", response = OkrResult.class)
    public OkrResult<BffAddResultsUnderTargetRespDto> addResultsUnderTarget(@RequestBody(required = false) @Validated BffAddResultsUnderTargetReqDto reqDTO) {
        return OkrResult.success(achievementService.addResultsUnderTarget(reqDTO));
    }
}
